<?php
/**
 * @package       system
 * @subpackage    filters
 */

/**
 * This filter logs all users with 'visitor' usernames     
 */
class LogVisitorFilter extends sfFilter 
{
  public function execute($filterChain) {
      $user = $this->getContext()->getUser();
      if(!$user->hasSession()) {
        $sessionName = $user->initSession();
        $this->getContext()->getLogger()->info('{'.get_class($this).'} CREATED NEW SESSION '.$sessionName);
      }
      $filterChain->execute();
  }
}
?>